import request from "@/utils/request";

// 获取全部客户信息
export function getAllCustomerInfo(params) {
  return request({
    url: "/admin/wecom/customer/findAllList",
    method: "get",
    params,
  });
}
// 全部客户新增
export function allCustomerAdd(data) {
  return request({
    url: "/admin/wecom/customer/addCustomer",
    method: "post",
    data,
  });
}
// 客户管理回收
export function customerRecovery(data) {
  return request({
    url: "/admin/wecom/customer/recovery",
    method: "post",
    data,
  });
}
// 获取管理机构
export function getAllDepartment(params) {
  return request({
    url: "/admin/wecom/customer/findDepartment",
    method: "get",
    params,
  });
}
// 获取员工
export function getAllWeUser(data) {
  return request({
    url: "/admin/wecom/customer/findWeUser",
    method: "post",
    data,
  });
}
// 分配到业务员
export function distributeCus(data) {
  return request({
    url: "/admin/wecom/customer/distributeCus",
    method: "post",
    data,
  });
}
// 获取我的客户信息
export function getMyCustomerInfo(params) {
  return request({
    url: "/admin/wecom/customer/findMyWeCustomerList",
    method: "get",
    params,
  });
}
// 我的客户转派
export function customerForward(data) {
  return request({
    url: "/admin/wecom/customer/forward",
    method: "post",
    data,
  });
}
// 客户详情
export function getFindCusDetail(data) {
  return request({
    url: "/admin/wecom/customer/findCusDetail",
    method: "post",
    data,
  });
}
// 客户详情标签查询
export function findCusWeTag(data) {
  return request({
    url: "/admin/wecom/customer/findCusWeTag",
    method: "post",
    data,
  });
}
// 客户详情标签新增
export function cusWeTagAdd(data) {
  return request({
    url: "/admin/wecom/customer/cusWeTagAdd",
    method: "post",
    data,
  });
}
// 客户详情修改信息
export function updateCusDetail(data) {
  return request({
    url: "/admin/wecom/customer/updateCusDetail",
    method: "post",
    data,
  });
}
// 客户详情相似客户
export function findCusSimilar(params) {
  return request({
    url: "/admin/wecom/customer/findCusSimilar",
    method: "get",
    params,
  });
}
// 客户详情跟进
export function followId(data) {
  return request({
    url: "/admin/wecom/customer/followId",
    method: "post",
    data,
  });
}
// 导入客户
export function importCus(data) {
  return request({
    url: "/admin/wecom/customer/importCus",
    method: "post",
    data,
  });
}
// 客户详情合并查询
export function findCusMerge(params) {
  return request({
    url: "/admin/wecom/customer/findCusMerge",
    method: "get",
    params,
  });
}
// 客户详情合并
export function updateCusMerge(data) {
  return request({
    url: "/admin/wecom/customer/updateCusMerge",
    method: "post",
    data,
  });
}

// 合并轨迹列表
export function findCusMergeTravel(params) {
  return request({
    url: "/admin/wecom/customer/findCusMergeTravel",
    method: "get",
    params,
  });
}

// 回退路径
export function fallbackCusMerge(data) {
  return request({
    url: "/admin/wecom/customer/fallbackCusMerge",
    method: "post",
    data,
  });
}

export function unbinding(data) {
  return request({
    url: "/admin/wecom/customer/unbinding",
    method: "post",
    data,
  });
}

// 详情页旅程
export function journey(data) {
  return request({
    url: "/admin/wecom/customer/journey",
    method: "post",
    data,
  });
}
// 查询企微群聊
export function findWeGroup(data) {
  return request({
    url: "/admin/wecom/customer/findWeGroup",
    method: "post",
    data,
  });
}
// 我的客户获取手机号微信号
export function findNumber(data) {
  return request({
    url: "/admin/wecom/customer/findNumber",
    method: "post",
    data,
  });
}
// 获取客户详情手机号、证件号
export function findNo(data) {
  return request({
    url: "/admin/wecom/customer/findNo",
    method: "post",
    data,
  });
}
// 详情页轨迹
export function customerTrack(data) {
  return request({
    url: "/admin/wecom/customer/customerTrack",
    method: "post",
    data,
  });
}
// 详情页保单
export function getListBySid(data) {
  return request({
    url: "/admin/operate/business/getListBySid",
    method: "post",
    data,
  });
}
// 详情页关系网亲友
export function findCusFamily(params) {
  return request({
    url: "/admin/wecom/customer/findCusFamily",
    method: "get",
    params,
  });
}
// 详情页关系网分享
export function findCusShare(params) {
  return request({
    url: "/admin/wecom/customer/findCusShare",
    method: "get",
    params,
  });
}

// 业务条线、渠道、平台接口查询
export function getallConfig(params) {
  return request({
    url: "/admin/admin/config/list/all",
    method: "get",
    params,
  });
}

// 客户详情-个人SOP、群SOP、群发客户、企业朋友圈、客户旅程任务
export function getTaskList(data) {
  return request({
    url: "/admin/customerInfo/reachlist",
    method: "post",
    data,
  });
}

// 根据等级查询客户详情信息
export function getBasicInfoData(data) {
  return request({
    url: "/admin/wecom/customer/findCusDetailR",
    method: "post",
    data,
  });
}

export function getCanAbleFieldList(params) {
  return request({
    url: "/admin/wecom/customer/getCanAbleFieldList",
    method: "get",
    params,
  });
}
